import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-form',
  templateUrl: './form.component.html',
  styleUrls: ['./form.component.css']
})
export class FormComponent implements OnInit {
  public peopleInfo:any = {
    username:'',
    sex:"1",
    cityList:['北京','上海','南京','深圳'],
    city:'北京',
    hobby:[{
      title:'打球',
      checked:false
    },{
      title:'看书',
      checked:false
    },{
      title:'打麻将',
      checked:true
    }],
    mark:" "
  }

  
  constructor() { }

  ngOnInit(): void {
  }
  doSubmit(){
    //dom
    // let usernameDom:any = document.getElementById('username');
    // console.log(usernameDom.value)

    //双向数据绑定
    console.log(this.peopleInfo)

  }

}
